Fractal Block World
Environment Variables
This documentation was created for the following version of the program: 0.92.0
One can toggle the console (while in game) by pressing the '~' key.
Commands can be entered while in the console. For example, entering the command "exit" will cause the program to exit.
The game has "environment variables" that can be accessed through the console. The "get" command prints the value of the specified environment variable.
The "ls" command lists all variables that start with a given prefix. Note: in addition to environment variables, there are "directories" which are simply a prefix of an environment variable name that ends with a period. The ls command lists variables and directories with the given prefix.
Variables can be changed using the "set" command, assuming you have access to do so. Note that all access is granted by enabling cheat codes.
Environment variables are important because you can set them in the "program_startup" script that is run when the program starts up. You can use this for advanced customization.
This document contains a dump of all environment variables.
This document was created by running the program and calling the "gendoc" console command.
Green entries represent directories, whereas grey ones represent individual environment variables. Some variables or directories are documented with blue text.
console (dir)
You can open the console in game by pressing "~". These vars describe the behavior of the console. They mostly regard the look and feel of it.
console.calc_num_cols (int)
This is a read only variable. It represents the max number of characters that can be in any line of the console window. This is determined from console.num_lines (which determines the height of each line) and console.char_hw_ratio. Also, the value must be less than or equal to console.max_cols.
console.char_hw_ratio (float)
The height to width ratio of any character. Note: the screen has width 1.0 and height 1.0.
console.cwd (string)
This var is not being used.
console.height (float)
The fraction of the screen the console takes up when open. So a value of 1.0 means it takes up the entine screen. Note that the height of each line is console.height / console.num_lines.
console.in (bool)
Whether or not the console is open.
console.max_cols (int)
The value of console.calc_num_cols will always be forced to be less thank or equal to console.max_cols.
console.num_lines (int)
The number of console lines displayed on the screen at any one time.
console.prmt (string)
The string displayed on the left of the line that the user is currently typing into. By default this is "$ ".
console.type_repeat_delay (float)
When the user holds down a key in the console, this is how long it takes before the character will be entered repeatedly.
console.type_repeat_speed (float)
After the user holds down a key in the console for a sufficiently long amount of time, this is how many times the character is entered per second.
console.style (dir)
console.style.back_alpha (float)
The alpha of the background of the console window.
console.style.back_color (vector)
The background color of the console window.
console.style.text_color (vector)
The (default) text color in the console window.
console.style.colored_text (dir)
console.style.colored_text.basic (dir)
The most basic way to color text displayed by the console is with the basic escape sequence ^N where N is between 0 and 7 inclusive. For example, by default "^1stop" will display the word "stop" in red. Which basic escape sequences correspond to what colors can be specified here. So if console.style.colored_text.basic.1 is set to (0.0, 1.0, 0.0), then "^1stop" will display the word "stop" in green. Note that a more advanced way to use colors is with the escape sequence ^xrrggbb, a sequence of 6 hex characters (lowercase).
console.style.colored_text.basic.0 (vector)
console.style.colored_text.basic.1 (vector)
console.style.colored_text.basic.2 (vector)
console.style.colored_text.basic.3 (vector)
console.style.colored_text.basic.4 (vector)
console.style.colored_text.basic.5 (vector)
console.style.colored_text.basic.6 (vector)
console.style.colored_text.basic.7 (vector)
debug (dir)
debug.bomb (bool)
Every so often, the program checks this var. If it is true, the program will exit. To exit the program immediately, use the exit command.
debug.charlie (bool)
Do not modify this var. This is used sometimes by the engine for debugging.
display (dir)
display.camera_params (dir)
display.camera_params.vfov (float)
This is the "vertical field of view" of the game's camera.
display.camera_params.a_ratio (dir)
display.camera_params.a_ratio.use_screen_resolution (bool)
If this is set to true, then the variable display.camera_params.a_ratio.value will be set to the screen width divided by the screen height.
display.camera_params.a_ratio.value (float)
Let the aratio be the value of this var. Let vfov be the value of display.camera_params.vfov. The hfov (horizontal field of view) is set to vfov * aratio. The world is rendered using the vfov and the hfov.
display.hud (dir)
display.hud.hide_all_huds (bool)
When this is true, the system hud (on the upper half of the screen) is not rendered, and the package defined hud windows (on the lower half of the screen) are not rendered (or updated) either. This is intended for taking a screenshot of the world.
display.hud.show_dir (bool)
Normally, when the viewer turns towards one of the 6 cardinal directions, either "UP", "DOWN", "LEFT", "RIGHT", "FRONT", or "BACK" will be displayed. However when this var is set to false, the displaying of this text is disabled.
display.hud.show_loading_graph_in_menus (bool)
Even when the player is in a menu (even the main menu), the "exploration" process continues. This is the process of creating and destroying chunks. When this var is set to true, a graph showing the progress of this process is displayed in the main menu.
display.hud.attack_display (dir)
The attack display shows colored circles in the center of the screen when the player is hit by enemy attacks. The location of the circle depends on where the attack came from. The size of the circle represents the damage done by the attack.
display.hud.attack_display.90_deg_radius (float)
The distance from the center of the screen attack circles are displayed which come from attacks that are 90 degrees from where the player is looking.
display.hud.attack_display.color (vector)
The color of the attack circles.
display.hud.attack_display.dot_radius (float)
The radius of an attack circle is proportial to this var times the damage done by the attack.
display.hud.attack_display.enable (bool)
This var represents whether or not the attack display should be shown.
display.hud.attack_display.keep_time (float)
How many seconds an attack circle stays on the screen, before it turns invisible and disappears.
display.hud.attack_display.screen_x_stretch (float)
The factor by which to stretch the entire attack display in the x direction. Note: the screen is 1.0 wide, and 1.0 high.
display.hud.crosshair (dir)
The crosshair texture is called "crosshair". So, you can change the crosshair texture by changing the file associated to the "crosshair" texture name in "Data/PACKAGE/Textures/texture_names.txt".
display.hud.crosshair.color (vector)
The color to shade the crosshair texture.
display.hud.crosshair.hide (bool)
If true, the crosshair will not be shown.
display.hud.crosshair.scale (float)
The size of the crosshair, in the y direction.
display.hud.crosshair.x_scale (float)
The size of the crosshair in the x direction is this var times display.hud.crosshair.scale.
display.hud.msg (dir)
The "hud message" is what shows up in the center of the screen, above the crosshairs, to display a message to the user. There can only be one hud message at a time, and the last hud message only lasts for a certain amount of time.
display.hud.msg.back_alpha (float)
The alpha of the background behind the hud message.
display.hud.msg.back_color (vector)
The color of the background behind the hud message.
display.hud.msg.color (vector)
The color of the text of the hud message.
display.hud.side_displays (dir)
On the upper left and upper right of the screen there are displays showing things like frame rate or what level the player is on. These are called "side displays". There are several vars associated to each side display. One var determines if the side display should be shown. Another var determines if the side display should be on the left vs the right side of the screen. The "priority" var determines the order the display is shown. The lower the priority number, the closer to the top of the screen the display appears.
display.hud.side_displays.fps (dir)
display.hud.side_displays.fps.left_side (bool)
display.hud.side_displays.fps.priority (int)
display.hud.side_displays.fps.show (bool)
display.hud.side_displays.fps_graph (dir)
display.hud.side_displays.fps_graph.left_side (bool)
display.hud.side_displays.fps_graph.priority (int)
display.hud.side_displays.fps_graph.show (bool)
display.hud.side_displays.level (dir)
display.hud.side_displays.level.left_side (bool)
display.hud.side_displays.level.priority (int)
display.hud.side_displays.level.show (bool)
display.hud.side_displays.loading_graph (dir)
display.hud.side_displays.loading_graph.left_side (bool)
display.hud.side_displays.loading_graph.priority (int)
display.hud.side_displays.loading_graph.show (bool)
display.screen (dir)
display.screen.actual_height (int)
This is a read only var. It is the height of the screen in pixels.
display.screen.actual_width (int)
This is a read only var. It is the width of the screen in pixels.
display.screen.always_use_desktop_res (bool)
If true, then the desktop resolution will be used for setting the vars display.screen.actual_height and display.screen.actual_width. If false, the vars display.screen.height and display.screen.width will be used instead.
display.screen.height (int)
This is like display.screen.width, but for the height instead.
display.screen.width (int)
The requested screen width in pixels. The program will try using this width, unless display.screen.always_use_desktop_res is true.
engine (dir)
engine.constant_saving (bool)
If either of the vars engine.constant_saving or game.constant_saving are true, then the game will be saved every few seconds automatically.
engine.exit_on_error (bool)
Some program errors will not cause the program to exit. However if this var is true, then when the program encounters many of thes errors it will exit explicitly.
engine.version (string)
The version of the program. An example would be "0.92.0".
engine.bents (dir)
engine.bents.disable_rendering (bool)
When true, the engine will NOT render basic entities.
engine.chunks (dir)
engine.chunks.show_chunk_lines (bool)
If true, then around each chunk in the active chunk tree will be drawn a wireframe cube.
engine.chunks.show_proto_chunks (bool)
When a chunk is first added to the chunk tree, it is an empty shell: a proto chunk. Only later is it populated. If this var is set to true, then instead of rendering a solid proto chunk normally, it is rendered using a special texture to show that it is a proto chunk.
engine.cutting (dir)
engine.cutting.enabled (bool)
Currently, this engine is not doing any "cutting".
engine.exploration (dir)
engine.exploration.disable (bool)
Exploration is the process of adding and removing chunks from the active chunk tree as the user moves through the world. When this var is true, the engine will NOT perform exploration.
engine.exploration.tethered (bool)
Normally when the user moves from one chunk to the next, all chunks on that level shift so that the following is always true: the chunk that contains the center point of the player is the central chunk for that level. However when this var is set to false, this shifting does NOT occur.
engine.exploration.level_radii (dir)
The radius of the viewer level is "engine.exploration.level_radii.0". The radius of viewer level - 1 is "engine.exploration.level_radii.1", etc. The default values for these are 3,3,2,1,0,0,0,0,0...The radius of a level specifies how far away from the viewer that chunks can be created and maintained.
engine.exploration.level_radii.0 (int)
engine.exploration.level_radii.1 (int)
engine.exploration.level_radii.2 (int)
engine.exploration.level_radii.3 (int)
engine.exploration.level_radii.4 (int)
engine.exploration.level_radii.5 (int)
engine.exploration.level_radii.6 (int)
engine.exploration.level_radii.7 (int)
engine.exploration.level_radii.8 (int)
engine.exploration.level_radii.9 (int)
engine.ments (dir)
engine.ments.disable_rendering (bool)
When true, the engine will NOT render moving entities.
engine.ments.disable_updates (bool)
When true, the engine will NOT perform any update functions on moving entities.
engine.particles (dir)
engine.particles.disable (bool)
When true, particle effects will not be rendered, and partices will not be updated.
engine.particles.sort_period (float)
Every so often, particles are sorted by their distance to the player. This var specifies how many seconds between these sortings.
engine.particles.throttle (dir)
Once there are too many particles in the world, whenever a new particle is requested to be created, it will only actually be created with a small probability P. Let V = "engine.particles.trottle". If the number of particles is between V.1.num and V.2.num, the probability P is V.1.frac. If the number of particles is between V.2.num and V.3.num, the probability P is V.2.frac. Finally, if the number of particles is over V.3.num, the probability P is V.3.frac.
engine.particles.throttle.1 (dir)
engine.particles.throttle.1.frac (float)
engine.particles.throttle.1.num (int)
engine.particles.throttle.2 (dir)
engine.particles.throttle.2.frac (float)
engine.particles.throttle.2.num (int)
engine.particles.throttle.3 (dir)
engine.particles.throttle.3.frac (float)
engine.particles.throttle.3.num (int)
engine.rayalg (dir)
engine.rayalg.disable (bool)
The ray algorithm is what is used when an entity is moved through the world and we need to find what it collides with.When this var is true, the engine disables this algorithm (so no collisions are detected).
engine.render (dir)
engine.render.disable_world (bool)
When true, the engine will NOT render the world, including all entities inside the world.
engine.render.handle_visray_false (string)
This specifies what should happen to chunks that DO intersect the view frustrum but ARE NOT render relevaent. If this var is set to "cocoon_render", then the block that occupies the same space as the chunk is rendered. This looks fine and is pretty fast. This should be the typical setting, and often the chunk is a proto chunk anyway so no rendering detail is lost. If this var is set to "full_render", then the chunk is rendered fully. This is very slow. If this var is set to "no_render", then the chunk is not rendered at all (not even as a block). This looks aweful, but is fast.
engine.render.rr (dir)
rr stands for "render relevant". Let X = the value of engine.render.rr.created_time. Let Y = the value of engine.render.rr.visray_hit_interval. A chunk is render relevant iff either it has been created (added to the chunk tree) within the last X seconds, or it has been hit by a visray within the last Y seconds.
engine.render.rr.created_time (float)
3.0 is a good value for this.
engine.render.rr.visray_hit_time (float)
10.0 is a good value for this.
engine.surfaces (dir)
engine.surfaces.show_quad_algorithm (bool)
The "quad algorithm" is what I am calling the algorithm I invented when working on Infinifrag 2 to greedily merge surface m by n quads together for rendering a block world. When this var is true, these individual quads are shown (before a vertex buffer object for the chunk is created).
engine.textures (dir)
Textures are loaded lazily in this program. That is, when a texture is needed, we either loaded it then and there (synchronously) or we load it asyncronously. When a texture is loaded asyncronously, then until we have the texture, we either use in place of it a black texture or a goofy pretty texture.
engine.textures.async (bool)
Whether or not textures should be loaded synchronously or asyncronously.
engine.textures.delete_time (float)
If a texture has been loaded but has not been used for this amount of time, then we delete it from memory. It can always be reloaded later if needed.
engine.textures.pixel_load_per_frame (int)
How many pixels can be loaded synchronously in a frame before we must load the remaining textures asyncronously.
engine.textures.use_not_loaded_pretty_tex (bool)
Whether or not we should use a goofy pretty texture, instead of a black texture, while we are waiting to load a texture asyncronously.
engine.visray (dir)
Every second, many visibility rays (visrays) are shot from the player's location. The purpose is to try to determine what chunks are visible from the player's position. Only chunks hit by a visray within the recent past are rendered, or updateded.
engine.visray.enabled (bool)
If fase, then no visrays are shot out and no system in the engine excepts visrays to hit chunks.
engine.visray.rays_per_sec (int)
The number of visrays shot from the player's position per second. Although visrays are shot in all directions, more are focused towards the direction where the player is looking.
engine.visray.update_interval (float)
After each time a chunk is hit by a visray, we will preform update functions for the chunk (for ments, particles, etc) for at least engine.visray.update_interval many seconds.
game (dir)
When a game is loaded, variables will be added here. When a game is closed, these variables will be removed. There are a few exceptions: a few variables need to exist here even if there is no game loaded. One such var is game.state.world_loaded. Another is game.version_error.1.forced_prefered_engine_ver.
game.constant_saving (bool)
game.globals (dir)
These are vars created by the package, as opposed to "system" game vars.
game.globals.blank (dir)
game.globals.blank.messages (dir)
game.globals.blank.messages.slot1 (dir)
game.globals.blank.messages.slot1.msg (string)
game.globals.blank.messages.slot1.ttl (float)
game.globals.blank.messages.slot2 (dir)
game.globals.blank.messages.slot2.msg (string)
game.globals.blank.messages.slot2.ttl (float)
game.globals.blank.messages.slot3 (dir)
game.globals.blank.messages.slot3.msg (string)
game.globals.blank.messages.slot3.ttl (float)
game.globals.blank.messages.slot4 (dir)
game.globals.blank.messages.slot4.msg (string)
game.globals.blank.messages.slot4.ttl (float)
game.globals.blank.messages.slot5 (dir)
game.globals.blank.messages.slot5.msg (string)
game.globals.blank.messages.slot5.ttl (float)
game.globals.blank.movement (dir)
game.globals.blank.movement.back (bool)
game.globals.blank.movement.brake (bool)
game.globals.blank.movement.down (bool)
game.globals.blank.movement.extra_impulse (vector)
game.globals.blank.movement.forward (bool)
game.globals.blank.movement.left (bool)
game.globals.blank.movement.right (bool)
game.globals.blank.movement.rocket (bool)
game.globals.blank.movement.rocket_mode (bool)
game.globals.blank.movement.spin_ccw (bool)
game.globals.blank.movement.spin_cw (bool)
game.globals.blank.movement.spin_value (float)
game.globals.blank.movement.up (bool)
game.input (dir)
These vars may eventually be moved to metagame.input.
game.input.last_input_time (float)
The last time there was any keyboard or mouse button input.
game.input.mouse (dir)